// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  ssr: true,

  build: {
    transpile:
      process.env.NODE_ENV === 'production'
        ? [
          'naive-ui',
          'vueuc',
          '@css-render/vue3-ssr',
          '@juggle/resize-observer'
        ]
        : ['@juggle/resize-observer']
  },

  vite: {
    optimizeDeps: {
      include:
        process.env.NODE_ENV === 'development'
          ? ['naive-ui', 'vueuc', 'date-fns-tz/esm/formatInTimeZone']
          : []
    }
  },
  eslint: {
    ignorePath: '.gitignore',
    lintOnStart: false
  },
  nitro: {
    storage: {
      'first': {
        driver: 'fs',
        base: './data'
      }
    },
  },

  modules: ['@nuxtjs/eslint-module', '@pinia/nuxt', 'dayjs-nuxt']
})